package com.wlps.vo.sendcenter.supplier;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * <p>
 *
 * </p>
 *
 * @author ZWYZY
 * @since 2020/8/2
 */
@Data
@ApiModel(value = "供应商对象更改Vo")
public class SupplierUpdateVo {
    @ApiModelProperty(value = "供应商编号")
    @NotNull(message = "必须填供应商编号")
    private Long id;
    @ApiModelProperty(value = "供应商名称")
    @NotNull(message = "必须填供应商名称")
    @NotBlank(message = "供应商名称不能为空")
    private String supplierName;

    @ApiModelProperty(value = "地址")
    @NotBlank(message = "地址不能为空")
    @NotNull(message = "必须填地址")
    private String address;

    @ApiModelProperty(value = "联系人")
    @NotNull(message = "必须填联系人")
    @NotBlank(message = "联系人不能为空")
    private String contactPerson;

    @ApiModelProperty(value = "联系电话")
    @NotNull(message = "必须填联系电话")
    @NotBlank(message = "联系电话不能为空")
    @Pattern(regexp = "0\\d{2,3}[-]?\\d{7,8}|0\\d{2,3}\\s?\\d{7,8}|13[0-9]\\d{8}|15[1089]\\d{8}",message = "电话格式不对")
    private String phone;

    @ApiModelProperty(value = "开户行")
    @NotNull(message = "必须填开户行")
    @NotBlank(message = "开户行不能为空")
    private String accountBank;

    @ApiModelProperty(value = "银行帐号")
    @NotNull(message = "必须填银行帐号")
    @NotBlank(message = "银行帐号不能为空")
    @Pattern(regexp = "^\\d{19}$",message = "银行账号格式不对")

    private String bankNumber;

    @ApiModelProperty(value = "传真")
    @NotNull(message = "必须填传真")
    @NotBlank(message = "传真不能为空")
    private String fax;

    @ApiModelProperty(value = "邮编")
    @NotNull(message = "必须填邮编")
    @NotBlank(message = "邮编不能为空")
    @Pattern(regexp = "[1-9]\\d{5}(?!\\d)",message = "邮编格式不对")
    private String postcode;

    @ApiModelProperty(value = "法人")
    @NotNull(message = "必须填法人")
    @NotBlank(message = "法人不能为空")
    private String legalPerson;

    @ApiModelProperty(value = "备注")
    private String remark;
}
